home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 4⁄27⁄90 / 1185-Re GC in C++ vs. Obj-Apr90 < prev    next >
Encoding:
Text File  |  1990-04-27  |  1.6 KB  |  40 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  A33          to A34
  2.  
  3. Item    0934247                         23-April-90        14:49PDT
  4.  
  5. From:   ALGER                           Alger, Jeff,VCA
  6.  
  7. To:     PASCOE1                         Pascoe, Geoff
  8.  
  9. cc:     MACAPP.TECH$                    MacApp Technical
  10.  
  11. Sub:    Re: GC in C++ vs. Object…
  12.  
  13. Geoff,
  14.  
  15. You are right that garbage collection is a major headache regardless of
  16. platform.  HOWEVER, I can attest from personal experience that C++ at least
  17. makes it a LOT easier to leave the interface frozen from the rest of the
  18. application while slipping whatever strategy you desire "under the sheets."  In
  19. a project I am working on now, we froze the interface very early on for a dumb,
  20. memory-hogging version, and are now overriding the "new" operator on a class
  21. level to throw in both generational AND mark-and-sweep GC with NO CHANGE to the
  22. rest of the program.  While retaining pointer-based objects, we moved them off
  23. the stack into blocks over which we have control with just a few lines of code,
  24. avoiding the worst of the headaches you describe.
  25.  
  26. An analogous solution in OP would be the so-called "pseudo-object" strategy,
  27. wherein control of allocation and deallocation of memory is wrested from the
  28. memory manager.  However, in OP you have to have the application know that this
  29. is taking place so that the right allocator is called; the strategy is not just
  30. in the classes themselves.
  31.  
  32. Having collected garbage in both languages, I stand by the assertion that C++
  33. makes life a lot easier, even if it doesn't do the whole job for you.
  34.  
  35. Regards,
  36. Jeff Alger
  37. Exis
  38. A Technology Firm of KPMG Peat Marwick
  39.  
  40.